<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
    data(){
      return{

      }
    },
    methods:{

    },
    // 使用watch 监听$router的变化,
    watch: {
        // 监听路由变化使滚动条全部都回到顶部
        '$route': function(to,from){
            document.body.scrollTop = 0
            document.documentElement.scrollTop = 0
        }
    },
    mounted(){

    }
}
</script>

<style>
    @import "./../static/indexApp.css";
    #app {
      /*font-family: 'Avenir', Helvetica, Arial, sans-serif;*/
      /*-webkit-font-smoothing: antialiased;*/
      /*-moz-osx-font-smoothing: grayscale;*/
      /*text-align: center;*/
      /*color: #2c3e50;*/
      /*margin-top: 60px;*/
    }

</style>
